var mysql = require('../dbs/mysql').connection;
exports.page = function(req, res, next){
	var page = req.body.page || 1;
	var sql = 'SELECT id,title,thumb,newsdesc FROM news ORDER BY createtime DESC limit ' + (page-1)*10 + ',10';
	mysql.query(sql, function(err, results){
		var dataModel = [];
		if(err){
		    res.send(dataModel);
		}else{
		    res.send(results);
		}
	})
}